import request from '@/utils/request'

export const getPrePublishCourseService = () => request.get('admin/course')

export const getAuditHistoryService = () => request.get('admin/course/history')

export const auditCourseService = ({ id, status, mind }) =>
  request({
    method: 'patch',
    url: `admin/course/audit/${id}/${status}`,
    data: mind,
    headers: {
      'Content-Type': 'application/json'
    }
  })

export const getInfoService = (id) => request.get(`admin/course/${id}`)
